package com.fare.taluo.application.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.fare.taluo.core.domain.crawl.statistics.StatusTaskEntity;

import com.fare.taluo.vo.core.StatusTaskEntityVo;
import com.fare.taluo.application.StatusTaskApplicaion;


@Transactional
@Scope("singleton")
@Service("statusTaskApplicaion")
public class StatusTaskApplicaionImpl implements StatusTaskApplicaion{

	@Override
	public List<StatusTaskEntityVo> getStatusTaskByPage() {
		// TODO Auto-generated method stub
		try {
			StatusTaskEntity ste = new StatusTaskEntity();
			List<StatusTaskEntity> listpo = ste.getStatusTaskByPage();
			List<StatusTaskEntityVo>listvo = new ArrayList<StatusTaskEntityVo>();
			for(StatusTaskEntity statusTaskEntity : listpo){
				StatusTaskEntityVo vo = new StatusTaskEntityVo();
				vo.setStatus(statusTaskEntity.getStatus());
				vo.setNum(statusTaskEntity.getNum());
				vo.setGrabchannel(statusTaskEntity.getGrabchannel());
				listvo.add(vo);
			}
			return listvo;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
		return null;
	}

}
